/**
 * Created by charlie on 18-1-18.
 */
import React from 'react'
import {View,Text,StyleSheet,ScrollView,TouchableOpacity,Image} from 'react-native'
import Color from '../../assets/colors';
import Loading from '../../components/loading/loading'
import {Actions} from 'react-native-router-flux';

export default class Index extends React.Component{
    render(){
        const {loading,data} = this.props.zhangGaiDan;
        return(
            <View>
                {loading?<Loading />:
                    <View style={{alignItems:'center',justifyItems:'center',marginTop:5}}>
                        {data.length ==0?<Text>暂无内容</Text>:
                            <View>
                                {data.map(i => (
                                    <View style={{alignItems:'center',justifyItems:'center',flexDirection:'row'}}>
                                        <View>
                                            <Text>{i.content}</Text>
                                            <Text style={{marginTop:10}}>{i.createDate}</Text>
                                        </View>
                                        <Image style={{width:80,height:80,marginLeft:20}}  source={{uri:i.uploadpath}} />
                                    </View>
                                ))}
                            </View>
                        }
                    </View>
                }
            </View>
        )
    }
}